package com.hotacorp.opencloud.gateway.keyresolver;

import org.springframework.cloud.gateway.filter.ratelimit.KeyResolver;
import org.springframework.web.server.ServerWebExchange;

import reactor.core.publisher.Mono;

/**
 * 方法决定者
 * @author lwg
 *
 */
public class MethodKeyResolver implements KeyResolver {
	public static final String BEAN_NAME = "methodKeyResolver";
	@Override
	public Mono<String> resolve(ServerWebExchange exchange) {
		return Mono.just(exchange.getRequest().getMethod().toString());
	}
}

